package com.hxgz.steel.dao;

import com.hxgz.steel.domain.ProductComments;
import com.hxgz.steel.dto.ProductCommentsDto;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface ProductCommentsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ProductComments record);

    int insertSelective(ProductComments record);

    ProductComments selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ProductComments record);

    int updateByPrimaryKey(ProductComments record);

    List<ProductCommentsDto> prodectComments(Long productId);

    /**
     * 根据orderId查询出商品是否有人评论过
     * @param orderId
     * @return
     */
    ProductComments getProduct(Long orderId);
}